<table class="table table-striped table-hover datatable">
  <thead>
    <tr>
      <th>#</th>
      <th>Title</th>
      <th>Author</th>
      <th>Published at</th>
      <th>Actions</th>
    </tr>
  </thead>
  <tbody>
    <% @posts.each do |post| %>
      <tr>
        <th><%= post.id %></th>
        <td><%= post.title %></td>
        <td><%= post.author %></td>
        <td><%= l post.published_at %></td>
        <td>
          <%= link_to "Edit", edit_admin_post_path(post) %>
          <%= link_to "Delete", admin_post_path(post), method: :delete %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
